#include <QPainter>

#include "workspacetabs.h"

#define WidgetHeight   (26)

WorkspaceTabs::WorkspaceTabs(QWidget *parent) : QComboBox(parent)
{
    //Update the size.
    setFixedHeight(WidgetHeight);
}

void WorkspaceTabs::paintEvent(QPaintEvent *e)
{
    Q_UNUSED(e)
    //Redraw the widget part.
    QPainter painter(this);
    painter.drawText(WidgetHeight, 0, width() - WidgetHeight, height(),
                     Qt::AlignVCenter,
                     currentText());
    //Draw the triangle.
}
